package copyengine.ui.component.list.old
{
	import copyengine.ui.component.list.old.cellrender.ICECellRenderData;

	import flash.events.Event;

	/**
	 * CEListCoreEvent event dispathch by CElistCore. the event contain all the list state info.
	 *
	 * @author Tunied
	 *
	 */
	public class CEListCoreEvent extends Event
	{

		/**
		 * CEListCore scroll will take some time(releate to listInteraction), so when list start scroll then send this event,
		 * normally this event will interested by listControl  Component (use this event info to update there state.)
		 */
		public static const SCROLL_START:String = "CEListCoreEvent_Scroll_Start";


		/**
		 * when user click one cellRenderItem , then send this event.
		 */
		public static const ITEM_CLICK:String = "CEListCoreEvent_ItemClick";

		/**
		 * Cellrender发生改变时候调用,
		 * <b>注意!!! </b>玩家点击Cellrender时候会派发ITEM_CLICK事件而不是Change事件,
		 * Change事件是由Cellredner单独调用dispatchListChangeEvent();所引发的
		 */
		public static const ITEM_CHANGE:String = "CEListCoreEvent_ItemChange";

		//===========
		//== Event
		//===========

		public var expectScrollPositon:Number;
		public var currentScrollPosition:Number;
		public var maxScrollPosition:Number;

		public var clickItemIndex:int;
		public var clickItemData:ICECellRenderData;
		public var clickStageX:Number;
		public var clickStageY:Number;

		//CECellRenderSymbol的子类当有元素点击时候将参数push到一个obj里面
		//当CECellRenderSymbol类(点击处理优先级最低)处理点击操作时候 将子类的obj挂在当前的
		//event上面并且清空原有obj，保证每次所携带的参数均为最新
		public var parameter:Object;


		public function CEListCoreEvent(type:String)
		{
			super(type, false, false);
		}
	}
}
